<?php
session_start();
$currPage = "register";
include("inc_header.php"); ?>

	<div id="content">
		<h2><a href="#">Register</a></h2>
		<div class="clearfix">
			<form name="newUsrForm" method="post" action="checkNewUsr.php">
				<table>
					<tr>
						<td>Username: </td>
						<td><input type="text" value="" name="newUsername" id="newUsername" size="40" maxlength="15"/></td>
					</tr><tr>
						<td>Password:</td>
						<td><input type="password" value="" name="newPword" id="newPword" size="16" maxlength="15" /> **must be less than 15 characters</td>
					</tr><tr>
						<td>Name:</td>
						<td><input type="text" value="" name="newName" id="newName" size="40"  maxlength="40"/></td>
					</tr><tr>
						<td>Email:</td>
						<td><input type="text" value="" name="newEmail" id="newEmail" size="40"  maxlength="30"/></td>
					</tr><tr>
						<td>Telephone:</td>
						<td><input type="text" value="" name="newTelephone" id="newTelephone" size="40"  maxlength="15"/></td>
					</tr><tr>
						<td>City:</td>
						<td><input type="text" value="" name="newCity" id="newCity" size="40" maxlength="40" /></td>
					</tr><tr>
						<td>State:</td>
						<td><input type="text" value="" name="newState" id="newState" size="3"  maxlength="2"/></td>
					</tr>
				</table><br />
				<div id="dealerSpan" onclick="dealer()"><Input type = 'Checkbox' Name ='dealerCheck' id ='dealerCheck' value ="admin" /> Yes, I am a auto dealer. </div>
				
				<br /><br />
				
				<table id="dealerInformation" style="display:none;">
					<tr>
						<td>Company Name:</td>
						<td><input type="text" value="" name="newCoName" id="newCoName" size="40" maxlength="30"/></td>
					</tr><tr>
						<td>Street Number:</td>
						<td><input type="text" value="" name="newStreetNum" id="newStreetNum" size="12" maxlength="11"/></td>
					</tr><tr>
						<td>Street Name:</td>
						<td><input type="text" value="" name="newStreetName" id="newStreetName" size="40" maxlength="30"/></td>
					</tr><tr>
						<td>ZIP code:</td>
						<td><input type="text" value="" name="newZipcode" id="newZipcode" size="12" maxlength="5"/></td>
					</tr><tr>
						<td>URL:</td>
						<td><input type="text" value="" name="newURL" id="newURL" size="40" maxlength="40"/></td>
					</tr><tr>
						<td style="vertical-align: top;">Description:</td>
						<td><textarea value="" name="desc" id="desc" style="width: 300px; height: 100px;"></textarea></td>
					</tr>
				</table>
				<br />
				<input type="submit" value="Register" name="submit" id="submit" />
				<br />
				
			</form>
		</div>

	</div>
	
	<script type="text/javascript">
		function dealer()
		{
			document.getElementById("dealerInformation").checked = !document.getElementById("dealerInformation").checked;
			if (document.getElementById("dealerCheck").checked == true)
			{
				document.getElementById("dealerInformation").style.display = "";
			}
			else
			{
				document.getElementById("dealerInformation").style.display = "none";
				document.getElementById("newCoName").value = "";
				document.getElementById("newZipcode").value = "";
				document.getElementById("newStreetName").value = "";
				document.getElementById("newStreetNum").value = "";
				document.getElementById("newURL").value = "";
				document.getElementById("desc").value = "";
			}
		}
	</script>

<?php include("inc_footer.php"); ?>
